package com.iwomy.envpro.platform.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.iwomy.envpro.common.core.util.R;
import com.iwomy.envpro.platform.VO.AirMonitorEquipmentDetailVO;
import com.iwomy.envpro.platform.VO.AirMonitorEquipmentVO;
import com.iwomy.envpro.platform.VO.EquipmentOnlineStatusVO;
import com.iwomy.envpro.platform.dto.AirMonitorEquipmentDTO;
import com.iwomy.envpro.platform.dto.CommandCodeDTO;
import com.iwomy.envpro.platform.entity.AirFactorEntity;
import com.iwomy.envpro.platform.entity.AirMonitorEquipmentEntity;

import java.util.List;

public interface AirMonitorEquipmentService extends IService<AirMonitorEquipmentEntity> {


	Page<AirMonitorEquipmentEntity> getAirMonitorEquipmentList(Page page, Long id);


	AirMonitorEquipmentEntity selectOneByEquipmentId(String equipment_id);

	List<AirMonitorEquipmentEntity> selectListByStatus(Integer status);


	List<AirMonitorEquipmentEntity> listByTag(AirMonitorEquipmentDTO airMonitorEquipmentDTO);


	Page<AirMonitorEquipmentVO> getAirMonitorEquipmentPage(Page<AirMonitorEquipmentVO> page, AirMonitorEquipmentDTO airMonitorEquipmentDTO);


	void atCommand(CommandCodeDTO commandCodeDTO);

	String config(CommandCodeDTO commandCodeDTO);

	/**
	 * 根据设备ID查询检测因子
	 *
	 * @param monitorEquipmentId
	 * @return
	 */
	List<AirFactorEntity> getMonitorEquipmentFactor(Long monitorEquipmentId);


	EquipmentOnlineStatusVO onlineStatus(AirMonitorEquipmentDTO airMonitorEquipmentDTO);

	/**
	 * 根据设备ID取设备详情
	 *
	 * @param getDetailById
	 * @return
	 */
	AirMonitorEquipmentDetailVO getDetailById(Long getDetailById);

	/**
	 * 新增设备
	 *
	 * @param airMonitorEquipment
	 * @return
	 */
	R newlyAdded(AirMonitorEquipmentEntity airMonitorEquipment);


	boolean remove(Long[] ids);


	List<AirMonitorEquipmentEntity> pageByScope(AirMonitorEquipmentEntity airMonitorEquipment);


}